#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "serwermanager.h"
#include <QMainWindow>
#include <QStackedWidget>
#include <QButtonGroup>
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QCommandLinkButton>
#include <QList>
#include <QTabWidget>
#include <QGroupBox>
#include <QMenuBar>
#include <QMenu>
#include <QMap>
#include <QMapIterator>
#include "imagewidget.h"
#include "serwersquantity.h"
#include "serwerbutoon.h"





class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    QWidget *center;
    QMenuBar *menu_bar;
    QStackedWidget *stacked_serwers;
    //QList <SerwerManager*> serwer_mangers;
    QMap <int,SerwerManager*> serwer_managers;
    QMap <int,SerwerButoon*> serwer_buttons;
    //QList <QCommandLinkButton*> serwer_buttons;
    //QList <QWidget*> serwer_mangers;
    QHBoxLayout *center_layout;
    QVBoxLayout *serwers_menu_layout;
    QTabWidget *tools_tab;
    QGroupBox *serwery_box;
    SerwersQuantity *qunatity_serwers;
    //
    QWidget *main_tool_tab;

    //
    QPushButton *login_button;
    QLineEdit *e_ip;
    QLineEdit *e_port;
    QVBoxLayout *login_layout;
    QPushButton *dodaj_do_bazy;
    QPushButton *testuj_serwer;
    QLabel *status_dodania;
    int licznik;



    void init_first_tool_tab();
    void add_serwer();
    void add_serwer2();


signals:
    void change_serwer_signal(QWidget *);



public slots:
    void serwervalid(int, QString);
    void rconvalid(int,bool);
    void change_serwer_slot(int);
        void delete_serwer(int id);

};

#endif // MAINWINDOW_H
